<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>

	</head>
	<body>
		<div id="filter-by-example">
		  <input v-model="name">
		  <ul>
				<!--  filterBy返回过滤后的数组-->
		    <li v-for="user in users | filterBy name in 'name'">
		      {{ user.name }}
		    </li>
		  </ul>

		</div>
	</body>
	<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		new Vue({
		  el: '#filter-by-example',
		  data: {
		    name: '',
		    users: [
		      { name: 'Bruce' },
		      { name: 'Chuck' },
		      { name: 'Jackie' }
		    ]
		  }
		});
	</script>
</html>
